package com.ruoyi.mop.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 药品对象 medicine
 *
 * @author ruoyi
 * @date 2024-03-08
 */
public class Medicine extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 药品ID */
    private Long id;

    /** 药品名称 */
    @Excel(name = "药品名称")
    private String name;

    /** 药品图片 */
    @Excel(name = "药品图片")
    private String image;

    /** 药品分类 */
    @Excel(name = "药品分类")
    private Long categoryId;

    /** 药品分类name */
    @Excel(name = "药品分类")
    private String categoryName;


    private Category category;

    /** 生产厂家 */
    @Excel(name = "生产厂家")
    private String manufacturer;

    /** 生产日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date manufactureDate;

    /** 保质期 */
    @Excel(name = "保质期")
    private String shelfLife;

    /** 使用建议 */
    @Excel(name = "使用建议")
    private String useMsg;

    /** 价格 */
    @Excel(name = "价格")
    private Double price;

    /** 处方中该药品的数量 */
    private Integer number = 0;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setImage(String image)
    {
        this.image = image;
    }

    public String getImage()
    {
        return image;
    }
    public void setCategoryId(Long categoryId)
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId()
    {
        return categoryId;
    }
    public void setCategoryName(String categoryName)
    {
        this.categoryName = categoryName;
    }

    public String getCategoryName()
    {
        return categoryName;
    }
    public void setManufacturer(String manufacturer)
    {
        this.manufacturer = manufacturer;
    }

    public String getManufacturer()
    {
        return manufacturer;
    }
    public void setManufactureDate(Date manufactureDate)
    {
        this.manufactureDate = manufactureDate;
    }

    public Date getManufactureDate()
    {
        return manufactureDate;
    }
    public void setShelfLife(String shelfLife)
    {
        this.shelfLife = shelfLife;
    }

    public String getShelfLife()
    {
        return shelfLife;
    }
    public void setUseMsg(String useMsg)
    {
        this.useMsg = useMsg;
    }

    public String getUseMsg()
    {
        return useMsg;
    }
    public void setPrice(Double price)
    {
        this.price = price;
    }

    public Double getPrice()
    {
        return price;
    }
    public void setNumber(Integer number)
    {
        this.number = number;
    }

    public Integer getNumber()
    {
        return number;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("image", getImage())
            .append("categoryId", getCategoryId())
            .append("manufacturer", getManufacturer())
            .append("manufactureDate", getManufactureDate())
            .append("shelfLife", getShelfLife())
            .append("useMsg", getUseMsg())
            .append("price", getPrice())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
